// 课程相关接口

import request from "@/utils/request";

// 新增课程
export function AddCourse(data) {
  return request({
    url: "/course/admin/course/save",
    method: "post",
    data,
  });
}

// 查询课程列表
export function QueryCoursePage(data) {
  return request({
    url: "/course/admin/course/page",
    method: "post",
    data,
  });
}

// 删除课程
export function DeleteCourse(id) {
  return request({
    url: `/course/admin/course/delete?id=${id}`,
    method: "delete",
  });
}

// 编辑课程
export function EditCourse(data) {
  return request({
    url: "/course/admin/course/edit",
    method: "put",
    data,
  });
}
